#! /usr/bin/env bash
set -e

export DEBIAN_FRONTEND=noninteractive
wget -qO - https://apt.stellar.org/SDF.asc | apt-key add -
echo "deb https://apt.stellar.org xenial stable" >/etc/apt/sources.list.d/SDF.list
echo "deb https://apt.stellar.org xenial unstable" >/etc/apt/sources.list.d/SDF-unstable.list
apt-get update
apt-get install -y stellar-core=${STELLAR_CORE_VERSION}
apt-get install -y stellar-horizon=${HORIZON_VERSION}
apt-get clean
echo "\nDone installing stellar-core and horizon...\n"
